using UnityEngine;

public class HealingArea : Item
{
    GameObject effect;
    float internalCoolDown;
    public override string GiveName()
    {
        return "Healing Area";
    }

    public override void Update(Player player, int stacks)
    {
        internalCoolDown -= 1;
    }

    public override void OnJump(Player player, int stacks)
    {
        if (internalCoolDown <= 0)
        {
            if (effect == null) effect = (GameObject)Resources.Load("Item Effects/Healing Area", typeof(GameObject));
            GameObject healingArea = GameObject.Instantiate(effect, player.transform.position, Quaternion.Euler(Vector3.zero));
            internalCoolDown = 10;
        }
    }
}